/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.sim.dto.general;

/**
 * 物联卡通信功能开停 DTO
 */
public class SimCommunicationFunctionDTO {

    /**
     * 物联卡号
     */
    private String msisdns;

    /**
     * 服务类型：
     * 01  基础语音通信服务
     * 08  短信基础服务
     * 10  国际漫游服务
     * 11  数据通信服务
     */
    private String serviceType;

    /**
     * 操作类型：
     * 0：暂停
     * 1：恢复
     */
    private  String operType;

    /**
     * APN名称，serviceType为11时，必填
     */
    private  String apnName;

    public String getMsisdns() {
        return msisdns;
    }

    public void setMsisdns(String msisdns) {
        this.msisdns = msisdns;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public String getOperType() {
        return operType;
    }

    public void setOperType(String operType) {
        this.operType = operType;
    }

    public String getApnName() {
        return apnName;
    }

    public void setApnName(String apnName) {
        this.apnName = apnName;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("物联卡号:").append(msisdns).append(",");
        if ("01".equals(serviceType)) {
            stringBuilder.append("服务类型:").append("基础语音通信服务").append(",");
        } else if ("08".equals(serviceType)) {
            stringBuilder.append("服务类型:").append("短信基础服务").append(",");
        } else if ("10".equals(serviceType)) {
            stringBuilder.append("服务类型:").append("国际漫游服务").append(",");
        } else if ("11".equals(serviceType)) {
            stringBuilder.append("服务类型:").append("数据通信服务").append(",");
        }
        if ("0".equals(operType)) {
            stringBuilder.append("操作类型:").append("暂停").append(",");
        } else if ("1".equals(operType)) {
            stringBuilder.append("操作类型:").append("恢复").append(",");
        }
        stringBuilder.append("APN名称:").append(apnName);
        return stringBuilder.toString();
    }
}
